var rdk = rdk || {};
rdk.app = rdk.app || {};
/**
 * 公众方法
 */
rdk.app.comFn = {
	toappTable : function(currentIndex) {

		var action = "app/appTable.do";
		var data = {
			currentIndex : currentIndex
		};
		base.AJAX_POST(action, data, 'html', function(html) {
			$("#app_table").empty().append($(html));
		});

	}
},

// 订单列表JS
rdk.app.appList = {
	init : function() {
		this.page.init();
		this.btn.init();
	},
	btn : {
		init : function() {
		}
	},

	page : {
		init : function() {
			this.loadUserTable();
		},

		loadUserTable : function() {
			rdk.app.comFn.toappTable(1);
		}
	}

},
rdk.app.detail={
	init:function(){
			this.btn.init();
	},
	btn:{
		init:function(){
			this.cancel();
		},
		cancel:function(){
			$("#cancel").click(function(){
				var action=	 "app/appList.do";
				base.getAction(action);
			});
		}
	}
		
},
rdk.app.appTable = {
	init : function() {
		this.page.init();
	},
	page : {
		init : function() {
			this.opreation.pagenation();
		},
		opreation : {
			init : function() {
			},
			detail:function(id){
				var action="app/detail.do?id="+id;
				base.getAction(action);
			},
			pagenation : function() {
				$(".tcdPageCode").createPage({
					pageCount : parseInt($("#totalPage").val()),
					current : parseInt($("#currentIndex").val()),
					backFn : function(p) {
						rdk.app.comFn.toappTable(p);
					}
				});
			}
		}
	}
};
